Skip to content

arch: add trivial-accessor exemption comments in workspace.go - #681

Merged
jeduden merged 3 commits into
mainfrom
claude/youthful-knuth-o0uznu
Jun 22, 2026
Merged

arch: add trivial-accessor exemption comments in workspace.go#681
jeduden merged 3 commits into
mainfrom
claude/youthful-knuth-o0uznu

Conversation

@jeduden

@jeduden jeduden commented Jun 22, 2026

Copy link
Copy Markdown
Owner

Summary

  • Adds // no test by design — trivial accessor to every truly trivial one-liner method in pkg/mdsmith/workspace.go so the architecture audit can distinguish intentional exemptions from forgotten tests (plan 2606211910)
  • memDirEntry.Type() and memFileInfo.Mode() were initially mis-labelled (both have if/else branches and do not qualify for the no-branch exemption per docs/development/architecture/tests.md §Exemptions) — their incorrect exemption comments were removed and dedicated unit tests added instead
  • Marks plan 2606211910 complete

Test plan

  • go build ./... passes
  • go test ./pkg/mdsmith/... passes (includes new TestMemDirEntry_Type and TestMemFileInfo_Mode)
  • 3 × /code-review xhigh --fix rounds applied; rounds 2 and 3 returned []

🤖 Generated with Claude Code


Generated by Claude Code

claude added 2 commits June 22, 2026 00:07
Add `// no test by design — trivial accessor` to every trivial
one-liner method in pkg/mdsmith/workspace.go: memFile.Close,
memDir.Read and Close, memDirEntry.Name/IsDir/Type/Info, and
memFileInfo.Name/Size/Mode/ModTime/IsDir/Sys. Mark plan
2606211910 complete.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018UGkejhkQXgkXqgii9tVKw
…ct trivial-accessor exemption

Both memDirEntry.Type() and memFileInfo.Mode() have if/else branches;
the architecture rule (tests.md §Exemptions) restricts the "no test by
design" exemption to "trivial accessor with no branch". Remove the
incorrect comments and add TestMemDirEntry_Type / TestMemFileInfo_Mode
covering both branches of each method.
@codecov

codecov Bot commented Jun 22, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 98.62%. Comparing base (4a16047) to head (49b71cb).

Additional details and impacted files
Components Coverage Δ
Go 98.61% <100.00%> (+<0.01%) ⬆️
TypeScript 99.54% <ø> (ø)

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@jeduden jeduden added queue Add to a PR to enqueue it queue:active Applied automatically when a PR is in an active batch and removed queue Add to a PR to enqueue it labels Jun 22, 2026
@jeduden

jeduden commented Jun 22, 2026

Copy link
Copy Markdown
Owner Author

🟢 Merge Queue — picked up

This PR is in the queue and will be batched with other queue-labelled PRs.

Next: No action needed — you'll get another comment when CI starts on the batch. View merge queue run.

@jeduden

jeduden commented Jun 22, 2026

Copy link
Copy Markdown
Owner Author

🔵 Merge Queue — CI running

Merged into batch branch merge-queue/batch-680-1782128092 alongside #680. View CI run.

Next: No action needed — you'll be notified when CI completes.

@jeduden
jeduden merged commit ff7ab4d into main Jun 22, 2026
32 checks passed
@jeduden jeduden removed the queue:active Applied automatically when a PR is in an active batch label Jun 22, 2026
@jeduden

jeduden commented Jun 22, 2026

Copy link
Copy Markdown
Owner Author

Merge Queue — merged

This PR landed on main via commit ff7ab4d. CI run that validated the merge.

Next: Done — nothing more to do here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants